package com.zmovie.framework.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zmovie.framework.domain.ActorRole;
import com.zmovie.framework.service.ActorRoleService;
import com.zmovie.framework.mapper.ActorRoleMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author lenovo
* @description 针对表【actor_role】的数据库操作Service实现
* @createDate 2023-12-04 15:52:02
*/
@Service
public class ActorRoleServiceImpl extends ServiceImpl<ActorRoleMapper, ActorRole>
    implements ActorRoleService{

    @Override
    public List<ActorRole> listActorRole(ActorRole actorRole) {
        LambdaQueryWrapper<ActorRole> wrapper = new LambdaQueryWrapper<>();
        wrapper.like(actorRole.getName() != null, ActorRole::getName, actorRole.getName());
        wrapper.orderByAsc(ActorRole::getId);
        return list(wrapper);
    }
}




